package com.liholin.springboot.sample.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class DataIsolateAspect {
    //@Pointcut("execution(@com.liholin.springboot.sample.annotation.DataIsolate * *(..))")
    @Pointcut("@annotation(com.liholin.springboot.sample.annotation.DataIsolate)")
    public void pointcut() {
    }

    @Around("pointcut()")
    public Object jointPoint(ProceedingJoinPoint joinPoint) throws Throwable {
        return joinPoint.proceed()+" limit 0,5 ";
    }
}
